home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / Finder.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  13.5 KB  |  329 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Finder.a
  3. ;
  4. ;    Contains:    Finder flags and container types.
  5. ;
  6. ;    Version:    Technology:    Mac OS 8.1
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1990-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__FINDER__') = 'UNDEFINED' THEN
  18. __FINDER__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  24.     include 'Quickdraw.a'
  25.     ENDIF
  26.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  27.     include 'Events.a'
  28.     ENDIF
  29.  
  30. ;  Creator and type of clipping files 
  31.  
  32. kClippingCreator                EQU        'drag'
  33. kClippingPictureType            EQU        'clpp'
  34. kClippingTextType                EQU        'clpt'
  35. kClippingSoundType                EQU        'clps'
  36. kClippingUnknownType            EQU        'clpu'
  37.  
  38. ;  Creator and type of Internet Location files 
  39.  
  40. kInternetLocationCreator        EQU        'drag'
  41. kInternetLocationHTTP            EQU        'ilht'
  42. kInternetLocationFTP            EQU        'ilft'
  43. kInternetLocationFile            EQU        'ilfi'
  44. kInternetLocationMail            EQU        'ilma'
  45. kInternetLocationNNTP            EQU        'ilnw'
  46. kInternetLocationAFP            EQU        'ilaf'
  47. kInternetLocationAppleTalk        EQU        'ilat'
  48. kInternetLocationGeneric        EQU        'ilge'
  49.  
  50.  
  51.  
  52. kCustomIconResource                EQU        -16455                ; Custom icon family resource ID 
  53. ;  In order to specify any of the information described in the 
  54. ;  CustomBadgeResource data structure you must clear the kExtendedFlagsAreInvalid 
  55. ;  and set kExtendedFlagHasCustomBadge of the FXInfo.fdXFlags or DXInfo.frXFlags field, 
  56. ;  and add a resource of type kCustomBadgeResourceType and ID kCustomBadgeResourceID to 
  57. ;  the file or to the "Icon/n" file for a folder 
  58.  
  59. kCustomBadgeResourceType        EQU        'badg'
  60. kCustomBadgeResourceID            EQU        -16455
  61. kCustomBadgeResourceVersion        EQU        0
  62. CustomBadgeResource        RECORD 0
  63. version                     ds.w    1                ; offset: $0 (0)        ;  This is version kCustomBadgeResourceVersion
  64. customBadgeResourceID     ds.w    1                ; offset: $2 (2)        ;  If not 0, the ID of a resource to use on top
  65. ;  of the icon for this file or folder
  66. customBadgeType             ds.l    1                ; offset: $4 (4)        ;  If not 0, the type and creator of an icon
  67. customBadgeCreator         ds.l    1                ; offset: $8 (8)        ;  to use on top of the icon
  68. windowBadgeType             ds.l    1                ; offset: $C (12)        ;  If not 0, the type and creator of an icon
  69. windowBadgeCreator         ds.l    1                ; offset: $10 (16)        ;  to display in the header of the window for this 
  70. ;  file or folder
  71. overrideType             ds.l    1                ; offset: $14 (20)        ;  If not 0, the type and creator of an icon to
  72. overrideCreator             ds.l    1                ; offset: $18 (24)        ;  use INSTEAD of the icon for this file or folder
  73. sizeof                     EQU *                    ; size:   $1C (28)
  74.                         ENDR
  75. ; typedef struct CustomBadgeResource *    CustomBadgeResourcePtr
  76.  
  77. ; typedef CustomBadgeResourcePtr *        CustomBadgeResourceHandle
  78.  
  79. ;  You can specify routing information for a file by including a 'rout' 0 
  80. ;    resource in it and setting the kExtendedFlagHasRoutingInfo bit in the extended 
  81. ;    Finder flags. 
  82. ;    The 'rout' resource is an array of RoutingResourceEntry. Each entry is considered
  83. ;    in turn. The first matching entry is used.
  84. ;    If the creator and fileType match the file being dropped and targetFolder match
  85. ;    the folder ID of the folder being dropped onto, then the file is rerouted 
  86. ;    into the specified destination folder.
  87. ;    The only target folder currently supported is the system folder, 
  88. ;    kSystemFolderType = 'macs'.
  89. ;
  90.  
  91.  
  92. kRoutingResourceType            EQU        'rout'
  93. kRoutingResourceID                EQU        0
  94. RoutingResourceEntry    RECORD 0
  95. creator                     ds.l    1                ; offset: $0 (0)        ;  Use '****' or 0 to match any creator 
  96. fileType                 ds.l    1                ; offset: $4 (4)        ;  Use '****' or 0 to match any file type 
  97. targetFolder             ds.l    1                ; offset: $8 (8)        ;  Folder ID of the folder this file was dropped onto 
  98. destinationFolder         ds.l    1                ; offset: $C (12)        ;  Folder that the source will be routed to 
  99. reserved                 ds.l    1                ; offset: $10 (16)        ;  Set to 0 
  100. sizeof                     EQU *                    ; size:   $14 (20)
  101.                         ENDR
  102. ; typedef struct RoutingResourceEntry *    RoutingResourcePtr
  103.  
  104. ; typedef RoutingResourcePtr *            RoutingResourceHandle
  105.  
  106.  
  107. ;  Types for special container aliases 
  108.  
  109. kContainerFolderAliasType        EQU        'fdrp'                ; type for folder aliases 
  110. kContainerTrashAliasType        EQU        'trsh'                ; type for trash folder aliases 
  111. kContainerHardDiskAliasType        EQU        'hdsk'                ; type for hard disk aliases 
  112. kContainerFloppyAliasType        EQU        'flpy'                ; type for floppy aliases 
  113. kContainerServerAliasType        EQU        'srvr'                ; type for server aliases 
  114. kApplicationAliasType            EQU        'adrp'                ; type for application aliases 
  115. kContainerAliasType                EQU        'drop'                ; type for all other containers 
  116. kDesktopPrinterAliasType        EQU        'dtpa'                ; type for Desktop Printer alias 
  117. kContainerCDROMAliasType        EQU        'cddr'                ; type for CD-ROM alias 
  118. ;  Types for Special folder aliases 
  119.  
  120. kSystemFolderAliasType            EQU        'fasy'
  121. kAppleMenuFolderAliasType        EQU        'faam'
  122. kStartupFolderAliasType            EQU        'fast'
  123. kPrintMonitorDocsFolderAliasType EQU    'fapn'
  124. kPreferencesFolderAliasType        EQU        'fapf'
  125. kControlPanelFolderAliasType    EQU        'fact'
  126. kExtensionFolderAliasType        EQU        'faex'
  127. ;  Types for AppleShare folder aliases 
  128.  
  129. kExportedFolderAliasType        EQU        'faet'
  130. kDropFolderAliasType            EQU        'fadr'
  131. kSharedFolderAliasType            EQU        'fash'
  132. kMountedFolderAliasType            EQU        'famn'
  133. ;  Finder flags (finderFlags, fdFlags and frFlags) 
  134. ;  Any flag reserved or not specified should be set to 0. 
  135. ;  If a flag applies to a file, but not to a folder, make sure to check 
  136. ;  that the item is not a folder by checking ((ParamBlockRec.ioFlAttrib & ioDirMask) == 0) 
  137.  
  138. kIsOnDesk                        EQU        $0001                ; Files and folders 
  139. kColor                            EQU        $000E                ; Files and folders 
  140.                                                             ; bit 0x0020 was kRequireSwitchLaunch, but is now reserved for future use
  141. kIsShared                        EQU        $0040                ; Files only (Applications only) 
  142.                                                             ; If clear, the application needs to write to 
  143.                                                             ; its resource fork, and therefore cannot be 
  144.                                                             ; shared on a server 
  145. kHasNoINITs                        EQU        $0080                ; Files only (Extensions/Control Panels only) 
  146.                                                             ; This file contains no INIT resource 
  147. kHasBeenInited                    EQU        $0100                ; Files only 
  148.                                                             ; Clear if the file contains desktop database 
  149.                                                             ; resources ('BNDL', 'FREF', 'open', 'kind'...) 
  150.                                                             ; that have not been added yet. Set only by the Finder 
  151.                                                             ; bit 0x0200 was the letter bit for AOCE, but is now reserved for future use 
  152. kHasCustomIcon                    EQU        $0400                ; Files and folders 
  153. kIsStationery                    EQU        $0800                ; Files only 
  154. kNameLocked                        EQU        $1000                ; Files and folders 
  155. kHasBundle                        EQU        $2000                ; Files only 
  156. kIsInvisible                    EQU        $4000                ; Files and folders 
  157. kIsAlias                        EQU        $8000                ; Files only 
  158. ;  Obsolete. Use names defined above. 
  159.  
  160. fOnDesk                            EQU        $0001
  161. fHasBundle                        EQU        $2000
  162. fInvisible                        EQU        $4000
  163. ;  Obsolete 
  164.  
  165. fTrash                            EQU        -3
  166. fDesktop                        EQU        -2
  167. fDisk                            EQU        0
  168.     IF OLDROUTINENAMES THEN
  169.  
  170. kIsStationary                    EQU        $0800
  171.     ENDIF    ; OLDROUTINENAMES
  172. ;  Extended flags (extendedFinderFlags, fdXFlags and frXFlags) 
  173. ;  Any flag not specified should be set to 0. 
  174.  
  175. kExtendedFlagsAreInvalid        EQU        $8000                ; If set the other extended flags are ignored 
  176. kExtendedFlagHasCustomBadge        EQU        $0100                ; Set if the file or folder has a badge resource 
  177. kExtendedFlagHasRoutingInfo        EQU        $0004                ; Set if the file contains routing info resource 
  178.  
  179.  
  180. ;  Use this creation date to indicate that a file is temporarily busy 
  181. ;  (while it is being downloaded or installed for example) 
  182. ;  This will prevent the Finder from attempting to change attributes 
  183. ;  of the file until it is fully created. 
  184.  
  185. kMagicBusyCreationDate            EQU        $4F3AFDB0
  186.  
  187. ; ------------------------------------------------------------------------
  188.  
  189. ;   The following data structures are binary compatible with FInfo, DInfo,
  190. ;   FXInfo and DXInfo but represent the Mac OS 8 semantic of the fields.
  191. ;   Use these data structures preferably to FInfo, etc...
  192.  
  193.  
  194. ; ------------------------------------------------------------------------
  195.  
  196. FileInfo                RECORD 0
  197. fileType                 ds.l    1                ; offset: $0 (0)        ;  The type of the file 
  198. fileCreator                 ds.l    1                ; offset: $4 (4)        ;  The file's creator 
  199. finderFlags                 ds.w    1                ; offset: $8 (8)        ;  ex: kHasBundle, kIsInvisible... 
  200. location                 ds        Point            ; offset: $A (10)        ;  File's location in the folder 
  201. ;  If set to {0, 0}, the Finder will place the item automatically 
  202. reserved                 ds.w    1                ; offset: $E (14)        ;  (set to 0) 
  203. sizeof                     EQU *                    ; size:   $10 (16)
  204.                         ENDR
  205. FolderInfo                RECORD 0
  206. windowBounds             ds        Rect            ; offset: $0 (0)        ;  The position and dimension of the folder's window 
  207. finderFlags                 ds.w    1                ; offset: $8 (8)        ;  ex. kIsInvisible, kNameLocked, etc.
  208. location                 ds        Point            ; offset: $A (10)        ;  Folder's location in the parent folder 
  209. ;  If set to {0, 0}, the Finder will place the item automatically 
  210. reserved                 ds.w    1                ; offset: $E (14)        ;  (set to 0) 
  211. sizeof                     EQU *                    ; size:   $10 (16)
  212.                         ENDR
  213. ExtendedFileInfo        RECORD 0
  214. reserved                 ds.w    4                ; offset: $0 (0)        ;  Reserved (set to 0) 
  215. extendedFinderFlags         ds.w    1                ; offset: $8 (8)        ;  Extended flags (custom badge, routing info...) 
  216. reserved2                 ds.w    1                ; offset: $A (10)        ;  Reserved (set to 0). Comment ID if high-bit is clear 
  217. putAwayFolderID             ds.l    1                ; offset: $C (12)        ;  Put away folder ID 
  218. sizeof                     EQU *                    ; size:   $10 (16)
  219.                         ENDR
  220. ExtendedFolderInfo        RECORD 0
  221. scrollPosition             ds        Point            ; offset: $0 (0)        ;  Scroll position (for icon views) 
  222. reserved                 ds.l    1                ; offset: $4 (4)        ;  Reserved (set to 0) 
  223. extendedFinderFlags         ds.w    1                ; offset: $8 (8)        ;  Extended flags (custom badge, routing info...) 
  224. reserved2                 ds.w    1                ; offset: $A (10)        ;  Reserved (set to 0). Comment ID if high-bit is clear 
  225. putAwayFolderID             ds.l    1                ; offset: $C (12)        ;  Put away folder ID 
  226. sizeof                     EQU *                    ; size:   $10 (16)
  227.                         ENDR
  228. ; ------------------------------------------------------------------------
  229.  
  230. ;   The following data structures are here for compatibility.
  231. ;   Use the new data structures replacing them if possible (i.e. FileInfo 
  232. ;   instead of FInfo, etc...)
  233.  
  234.  
  235. ; ------------------------------------------------------------------------
  236. ;  File info 
  237.  
  238. ;     IMPORTANT:
  239. ;     In MacOS 8, the fdFldr field has become reserved for the Finder.
  240.  
  241.  
  242. FInfo                    RECORD 0
  243. fdType                     ds.l    1                ; offset: $0 (0)        ;  The type of the file 
  244. fdCreator                 ds.l    1                ; offset: $4 (4)        ;  The file's creator 
  245. fdFlags                     ds.w    1                ; offset: $8 (8)        ;  Flags ex. kHasBundle, kIsInvisible, etc. 
  246. fdLocation                 ds        Point            ; offset: $A (10)        ;  File's location in folder. 
  247. ;  If set to {0, 0}, the Finder will place the item automatically 
  248. fdFldr                     ds.w    1                ; offset: $E (14)        ;  Reserved (set to 0) 
  249. sizeof                     EQU *                    ; size:   $10 (16)
  250.                         ENDR
  251. ;  Extended file info 
  252.  
  253. ;     IMPORTANT:
  254. ;     In MacOS 8, the fdIconID and fdComment fields were changed
  255. ;     to become reserved fields for the Finder.
  256. ;       The fdScript has become an extended flag.
  257.  
  258.  
  259. FXInfo                    RECORD 0
  260. fdIconID                 ds.w    1                ; offset: $0 (0)        ;  Reserved (set to 0) 
  261. fdReserved                 ds.w    3                ; offset: $2 (2)        ;  Reserved (set to 0) 
  262. fdScript                 ds.b    1                ; offset: $8 (8)        ;  Extended flags. Script code if high-bit is set 
  263. fdXFlags                 ds.b    1                ; offset: $9 (9)        ;  Extended flags 
  264. fdComment                 ds.w    1                ; offset: $A (10)        ;  Reserved (set to 0). Comment ID if high-bit is clear 
  265. fdPutAway                 ds.l    1                ; offset: $C (12)        ;  Put away folder ID 
  266. sizeof                     EQU *                    ; size:   $10 (16)
  267.                         ENDR
  268. ;  Folder info 
  269.  
  270. ;     IMPORTANT:
  271. ;     In MacOS 8, the frView field was changed to become reserved 
  272. ;       field for the Finder.
  273.  
  274.  
  275. DInfo                    RECORD 0
  276. frRect                     ds        Rect            ; offset: $0 (0)        ;  Folder's window bounds 
  277. frFlags                     ds.w    1                ; offset: $8 (8)        ;  Flags ex. kIsInvisible, kNameLocked, etc.
  278. frLocation                 ds        Point            ; offset: $A (10)        ;  Folder's location in parent folder 
  279. ;  If set to {0, 0}, the Finder will place the item automatically 
  280. frView                     ds.w    1                ; offset: $E (14)        ;  Reserved (set to 0) 
  281. sizeof                     EQU *                    ; size:   $10 (16)
  282.                         ENDR
  283. ;  Extended folder info 
  284.  
  285. ;     IMPORTANT:
  286. ;     In MacOS 8, the frOpenChain and frComment fields were changed
  287. ;     to become reserved fields for the Finder.
  288. ;       The frScript has become an extended flag.
  289.  
  290.  
  291. DXInfo                    RECORD 0
  292. frScroll                 ds        Point            ; offset: $0 (0)        ;  Scroll position 
  293. frOpenChain                 ds.l    1                ; offset: $4 (4)        ;  Reserved (set to 0) 
  294. frScript                 ds.b    1                ; offset: $8 (8)        ;  Extended flags. Script code if high-bit is set 
  295. frXFlags                 ds.b    1                ; offset: $9 (9)        ;  Extended flags 
  296. frComment                 ds.w    1                ; offset: $A (10)        ;  Reserved (set to 0). Comment ID if high-bit is clear 
  297. frPutAway                 ds.l    1                ; offset: $C (12)        ;  Put away folder ID 
  298. sizeof                     EQU *                    ; size:   $10 (16)
  299.                         ENDR
  300. ;  Values of the 'message' parameter to a Control Panel 'cdev' 
  301.  
  302. initDev                            EQU        0                    ;Time for cdev to initialize itself
  303. hitDev                            EQU        1                    ;Hit on one of my items
  304. closeDev                        EQU        2                    ;Close yourself
  305. nulDev                            EQU        3                    ;Null event
  306. updateDev                        EQU        4                    ;Update event
  307. activDev                        EQU        5                    ;Activate event
  308. deactivDev                        EQU        6                    ;Deactivate event
  309. keyEvtDev                        EQU        7                    ;Key down/auto key
  310. macDev                            EQU        8                    ;Decide whether or not to show up
  311. undoDev                            EQU        9
  312. cutDev                            EQU        10
  313. copyDev                            EQU        11
  314. pasteDev                        EQU        12
  315. clearDev                        EQU        13
  316. cursorDev                        EQU        14
  317.  
  318. ;  Special values a Control Panel 'cdev' can return 
  319.  
  320. cdevGenErr                        EQU        -1                    ;General error; gray cdev w/o alert
  321. cdevMemErr                        EQU        0                    ;Memory shortfall; alert user please
  322. cdevResErr                        EQU        1                    ;Couldn't get a needed resource; alert
  323. cdevUnset                        EQU        3                    ; cdevValue is initialized to this
  324. ;  Control Panel Default Proc 
  325.  
  326.  
  327.     ENDIF ; __FINDER__ 
  328.  
  329.